package com.jdrx.sw.sewage.common.enums;

import com.jdrx.sw.sewage.common.constant.Constant;

public enum EAlarmDict {
    DEVICE("device", "设备告警"),
    QUALITY("quality", "水质告警"),
    OUTOFCONTACT("outofcontact", "失联告警");

    private String key;
    private String value;

    EAlarmDict(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getName(String key) {
        for (EAlarmDict status : EAlarmDict.values()) {
            if (key.equals(status.getKey())) {
                return status.getValue();
            }
        }
        return Constant.EMPTY;
    }

	public String getKey(){
		return key;
	}

	public void setKey(String key){
		this.key = key;
	}

	public String getValue(){
		return value;
	}

	public void setValue(String value){
		this.value = value;
	}
}
